s cannot be null here, so remove the useless test and error-handling block.
authorLuigi Rizzo <rizzo@icir.org>
Fri, 6 Oct 2006 20:34:11 +0000 (20:34 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Fri, 6 Oct 2006 20:34:11 +0000 (20:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44617 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 0a6b098..f9fdca8 100644 (file)
@@ -2438,7 +2438,7 @@ static char *generic_http_callback(int format, struct sockaddr_in *requestor, co
        ast_mutex_unlock(&s->__lock);
        
        memset(&m, 0, sizeof(m));
        ast_mutex_unlock(&s->__lock);
        
        memset(&m, 0, sizeof(m));
-       if (s) {
+       {
                char tmp[80];
                ast_build_string(&c, &len, "Content-type: text/%s\r\n", contenttype[format]);
                sprintf(tmp, "%08lx", s->managerid);
                char tmp[80];
                ast_build_string(&c, &len, "Content-type: text/%s\r\n", contenttype[format]);
                sprintf(tmp, "%08lx", s->managerid);
@@ -2496,9 +2496,6 @@ static char *generic_http_callback(int format, struct sockaddr_in *requestor, co
                        ast_build_string(&c, &len, "</ajax-response>\n");
                } else if (format == FORMAT_HTML)
                        ast_build_string(&c, &len, "</table></body>\r\n");
                        ast_build_string(&c, &len, "</ajax-response>\n");
                } else if (format == FORMAT_HTML)
                        ast_build_string(&c, &len, "</table></body>\r\n");
-       } else {
-               *status = 500;
-               *title = strdup("Server Error");
        }
        ast_mutex_lock(&s->__lock);
        if (s->needdestroy) {
        }
        ast_mutex_lock(&s->__lock);
        if (s->needdestroy) {