Module: sip-router Branch: master Commit: 162c7531cc414020f533a7a934fea0870f9cd503 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=162c7531...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Thu May 17 15:32:19 2012 +0100
modules_k/pua: Removed some unnecessary checks from pua_db.c
---
modules_k/pua/pua_db.c | 62 +++-------------------------------------------- 1 files changed, 4 insertions(+), 58 deletions(-)
diff --git a/modules_k/pua/pua_db.c b/modules_k/pua/pua_db.c index 2e6c398..c064c25 100644 --- a/modules_k/pua/pua_db.c +++ b/modules_k/pua/pua_db.c @@ -922,20 +922,7 @@ int delete_record_puadb(ua_pres_t *pres) return -1; }
- if (pua_dbf.affected_rows == NULL) - return 1; - - switch(pua_dbf.affected_rows(pua_db)) - { - case 0: - LM_ERR("no rows deleted\n"); - return -1; - case 1: - return 1; - default: - LM_ERR("too many rows deleted\n"); - return -1; - } + return 1; }
/******************************************************************************/ @@ -1002,22 +989,7 @@ int update_record_puadb(ua_pres_t *pres, int expires, str *etag) return -1; }
- if (pua_dbf.affected_rows == NULL) - { - return 0; - } - - switch(pua_dbf.affected_rows(pua_db)) - { - case 0: - LM_INFO("no rows updated\n"); - return -1; - case 1: - return 1; - default: - LM_ERR("too many rows updated\n"); - return -1; - } + return 1; }
/******************************************************************************/ @@ -1302,20 +1274,7 @@ int delete_dialog_puadb(ua_pres_t *pres) return -1; }
- if (pua_dbf.affected_rows == NULL) - return 1; - - switch(pua_dbf.affected_rows(pua_db)) - { - case 0: - LM_ERR("no rows deleted\n"); - return -1; - case 1: - return 1; - default: - LM_ERR("too many rows deleted\n"); - return -1; - } + return 1; }
/******************************************************************************/ @@ -1388,20 +1347,7 @@ int update_dialog_puadb(ua_pres_t *pres, int expires, str *contact) return -1; }
- if (pua_dbf.affected_rows == NULL) - return 1; - - switch(pua_dbf.affected_rows(pua_db)) - { - case 0: - LM_ERR("no rows updated\n"); - return -1; - case 1: - return 1; - default: - LM_ERR("too many rows updated\n"); - return -1; - } + return 1; }
/******************************************************************************/