Changeset 427 for vendor/current/lib
- Timestamp:
- Apr 9, 2010, 3:20:58 PM (15 years ago)
- Location:
- vendor/current/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/tevent/tevent.c
r414 r427 177 177 se->event_ctx = NULL; 178 178 DLIST_REMOVE(ev->signal_events, se); 179 /* 180 * This is important, Otherwise signals 181 * are handled twice in child. eg, SIGHUP. 182 * one added in parent, and another one in 183 * the child. -- BoYang 184 */ 185 tevent_cleanup_pending_signal_handlers(se); 179 186 } 180 187 -
vendor/current/lib/tevent/tevent_internal.h
r414 r427 300 300 const char *location); 301 301 int tevent_common_check_signal(struct tevent_context *ev); 302 void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se); 302 303 303 304 bool tevent_standard_init(void); -
vendor/current/lib/tevent/tevent_signal.c
r414 r427 134 134 static int tevent_common_signal_list_destructor(struct tevent_common_signal_list *sl) 135 135 { 136 DLIST_REMOVE(sig_state->sig_handlers[sl->se->signum], sl); 136 if (sig_state->sig_handlers[sl->se->signum]) { 137 DLIST_REMOVE(sig_state->sig_handlers[sl->se->signum], sl); 138 } 137 139 return 0; 138 140 } … … 155 157 if (sig_state->sig_handlers[se->signum] == NULL) { 156 158 /* restore old handler, if any */ 157 sigaction(se->signum, sig_state->oldact[se->signum], NULL); 158 sig_state->oldact[se->signum] = NULL; 159 if (sig_state->oldact[se->signum]) { 160 sigaction(se->signum, sig_state->oldact[se->signum], NULL); 161 sig_state->oldact[se->signum] = NULL; 162 } 159 163 #ifdef SA_SIGINFO 160 164 if (se->sa_flags & SA_SIGINFO) { 161 talloc_free(sig_state->sig_info[se->signum]); 162 sig_state->sig_info[se->signum] = NULL; 165 if (sig_state->sig_info[se->signum]) { 166 talloc_free(sig_state->sig_info[se->signum]); 167 sig_state->sig_info[se->signum] = NULL; 168 } 163 169 } 164 170 #endif … … 399 405 return 1; 400 406 } 407 408 void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se) 409 { 410 struct tevent_common_signal_list *sl; 411 sl = talloc_get_type(se->additional_data, 412 struct tevent_common_signal_list); 413 414 tevent_common_signal_list_destructor(sl); 415 416 if (sig_state->sig_handlers[se->signum] == NULL) { 417 if (sig_state->oldact[se->signum]) { 418 sigaction(se->signum, sig_state->oldact[se->signum], NULL); 419 sig_state->oldact[se->signum] = NULL; 420 } 421 } 422 return; 423 } -
vendor/current/lib/util/talloc_stack.c
r414 r427 104 104 } 105 105 talloc_free(ts->talloc_stack[i]); 106 ts->talloc_stack[i] = NULL; 106 107 } 107 108 109 ts->talloc_stack[i] = NULL; 108 110 ts->talloc_stacksize = i; 109 111 return 0; … … 182 184 (struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts); 183 185 184 if (ts == NULL ) {186 if (ts == NULL || ts->talloc_stacksize == 0) { 185 187 talloc_stackframe(); 186 188 ts = (struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts); -
vendor/current/lib/util/util_tdb.c
r414 r427 39 39 } 40 40 41 bool tdb_data_equal(TDB_DATA t1, TDB_DATA t2) 42 { 43 if (t1.dsize != t2.dsize) { 44 return false; 45 } 46 return (memcmp(t1.dptr, t2.dptr, t1.dsize) == 0); 47 } 48 41 49 TDB_DATA string_tdb_data(const char *string) 42 50 { -
vendor/current/lib/util/util_tdb.h
r414 r427 7 7 ****************************************************************/ 8 8 TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize); 9 bool tdb_data_equal(TDB_DATA t1, TDB_DATA t2); 9 10 TDB_DATA string_tdb_data(const char *string); 10 11 TDB_DATA string_term_tdb_data(const char *string);
Note:
See TracChangeset
for help on using the changeset viewer.