Skip to content

Commit

Permalink
pua: define constants for send_publish return codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiusas committed Jan 27, 2014
1 parent f10288b commit 51b5195
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/pua/send_publish.c
Expand Up @@ -377,7 +377,7 @@ int send_publish_int(ua_pres_t* presentity, publ_info_t* publ, pua_event_t* ev,
int hash_index)
{
unsigned long pres_id= 0;
int ret = -1;
int ret = ERR_PUBLISH_GENERIC;
char etag_buf[256];
char tuple_buf[128];
str tuple_id= {0, 0};
Expand Down Expand Up @@ -447,6 +447,7 @@ int send_publish_int(ua_pres_t* presentity, publ_info_t* publ, pua_event_t* ev,
{
LM_DBG("request for a publish with expires 0 and"
" no record found\n");
ret = ERR_PUBLISH_NO_RECORD;
goto error;
}
if(publ->body== NULL)
Expand Down Expand Up @@ -496,7 +497,7 @@ int send_publish_int(ua_pres_t* presentity, publ_info_t* publ, pua_event_t* ev,
pkg_free(body);
}

return 0;
return ERR_PUBLISH_NO_ERROR;

error:
if(body && ev->process_body)
Expand Down
5 changes: 4 additions & 1 deletion modules/pua/send_publish.h
Expand Up @@ -31,7 +31,10 @@
#include "hash.h"
#include "event_list.h"

#define ERR_PUBLISH_NO_BODY -10
#define ERR_PUBLISH_NO_ERROR 0
#define ERR_PUBLISH_GENERIC -1
#define ERR_PUBLISH_NO_RECORD -9
#define ERR_PUBLISH_NO_BODY -10

typedef struct publ_info
{
Expand Down

0 comments on commit 51b5195

Please sign in to comment.