summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c4
-rw-r--r--res/res_snmp.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 0787ec862..68675bd6d 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1897,7 +1897,7 @@ static int manager_parking_status( struct mansession *s, struct message *m )
cur=parkinglot;
while(cur) {
- ast_cli(s->fd, "Event: ParkedCall\r\n"
+ astman_append(s, "Event: ParkedCall\r\n"
"Exten: %d\r\n"
"Channel: %s\r\n"
"From: %s\r\n"
@@ -1915,7 +1915,7 @@ static int manager_parking_status( struct mansession *s, struct message *m )
cur = cur->next;
}
- ast_cli(s->fd,
+ astman_append(s,
"Event: ParkedCallsComplete\r\n"
"%s"
"\r\n",idText);
diff --git a/res/res_snmp.c b/res/res_snmp.c
index e62e6fb05..871a74da6 100644
--- a/res/res_snmp.c
+++ b/res/res_snmp.c
@@ -31,7 +31,7 @@ int res_snmp_agentx_subagent;
int res_snmp_dont_stop;
int res_snmp_enabled;
-static pthread_t thread;
+static pthread_t thread = AST_PTHREADT_NULL;
static int load_config(void)
{
@@ -111,8 +111,9 @@ int reload(void)
ast_verbose(VERBOSE_PREFIX_1 "Reloading [Sub]Agent Module\n");
res_snmp_dont_stop = 0;
- pthread_join(thread, NULL);
-
+ if (thread != AST_PTHREADT_NULL)
+ pthread_join(thread, NULL);
+ thread = AST_PTHREADT_NULL;
load_config();
res_snmp_dont_stop = 1;