Hello,
I was reading the source code of the pua_mi module and I think I have
found some wrong check in mi_func.c (checking str.s == 0 instead of
str.len == 0).
Regards,
Nikita
commit d9a806192e33e8c9eec9d65db7e946bbf66aa8bb
Author: Nikita Kozlov <[email protected]>
Date: Tue May 17 18:37:17 2011 +0200
fix bad checks in pua_mi/mi_func.c
diff --git a/modules_k/pua_mi/mi_func.c b/modules_k/pua_mi/mi_func.c
index fe3fa3a..5767a9b 100644
--- a/modules_k/pua_mi/mi_func.c
+++ b/modules_k/pua_mi/mi_func.c
@@ -72,7 +72,7 @@ struct mi_root* mi_pua_publish(struct mi_root* cmd, void* param)
/* Get presentity URI */
pres_uri = node->value;
- if(pres_uri.s == NULL || pres_uri.s== 0)
+ if(pres_uri.s == NULL || pres_uri.len== 0)
{
LM_ERR("empty uri\n");
return init_mi_tree(404, "Empty presentity URI", 20);
@@ -193,7 +193,7 @@ struct mi_root* mi_pua_publish(struct mi_root* cmd, void* param)
return init_mi_tree(400, "Too many parameters", 19);
body= node->value;
- if(body.s == NULL || body.s== 0)
+ if(body.s == NULL || body.len== 0)
{
LM_ERR("empty body parameter\n");
return init_mi_tree(400, "Empty body parameter", 20);
@@ -381,7 +381,7 @@ struct mi_root* mi_pua_subscribe(struct mi_root* cmd, void* param)
return 0;
pres_uri= node->value;
- if(pres_uri.s == NULL || pres_uri.s== 0)
+ if(pres_uri.s == NULL || pres_uri.len== 0)
{
return init_mi_tree(400, "Bad uri", 7);
}
@@ -396,7 +396,7 @@ struct mi_root* mi_pua_subscribe(struct mi_root* cmd, void* param)
return 0;
watcher_uri= node->value;
- if(watcher_uri.s == NULL || watcher_uri.s== 0)
+ if(watcher_uri.s == NULL || watcher_uri.len== 0)
{
return init_mi_tree(400, "Bad uri", 7);
}
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev