Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: dhcpcd-dbus.c

Issue 2851023: dhcpcd-dbus.c::msg_handler(): Call raise() instead of handle_signal(), (Closed) Base URL: ssh://git@chromiumos-git/dhcpcd.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * dhcpcd-dbus 2 * dhcpcd-dbus
3 * Copyright 2009 Roy Marples <roy@marples.name> 3 * Copyright 2009 Roy Marples <roy@marples.name>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } else if (IsMethod(msg, "GetVersion")) { 477 } else if (IsMethod(msg, "GetVersion")) {
478 return version(con, msg, VERSION); 478 return version(con, msg, VERSION);
479 } else if (IsMethod(msg, "GetInterfaces")) { 479 } else if (IsMethod(msg, "GetInterfaces")) {
480 return dhcpcd_get_interfaces(con, msg); 480 return dhcpcd_get_interfaces(con, msg);
481 } else if (IsMethod(msg, "GetStatus")) { 481 } else if (IsMethod(msg, "GetStatus")) {
482 return return_status(con, msg); 482 return return_status(con, msg);
483 } else if (IsMethod(msg, "Rebind")) { 483 } else if (IsMethod(msg, "Rebind")) {
484 bind_interface(ifaces); /* XXX */ 484 bind_interface(ifaces); /* XXX */
485 return dbus_ack(con, msg); 485 return dbus_ack(con, msg);
486 } else if (IsMethod(msg, "Release")) { 486 } else if (IsMethod(msg, "Release")) {
487 » » handle_signal(SIGHUP); 487 » » raise(SIGHUP);
488 return dbus_ack(con, msg); 488 return dbus_ack(con, msg);
489 } else if (IsMethod(msg, "Stop")) { 489 } else if (IsMethod(msg, "Stop")) {
490 /* NB: must ack first 'cuz handle_signal exit's */ 490 /* NB: must ack first 'cuz handle_signal exit's */
491 (void) dbus_ack(con, msg); 491 (void) dbus_ack(con, msg);
492 » » handle_signal(SIGINT); 492 » » raise(SIGINT);
493 /*NOTREACHED*/ 493 /*NOTREACHED*/
494 } 494 }
495 return return_dbus_error(con, msg, S_EINVAL, S_ARGS); 495 return return_dbus_error(con, msg, S_EINVAL, S_ARGS);
496 #undef IsMethod 496 #undef IsMethod
497 } 497 }
498 498
499 static void 499 static void
500 dbus_event(int revents, void *watch) 500 dbus_event(int revents, void *watch)
501 { 501 {
502 int flags; 502 int flags;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 run_script(const struct interface *ifp) 617 run_script(const struct interface *ifp)
618 { 618 {
619 syslog(LOG_DEBUG, "executing `%s', reason %s", 619 syslog(LOG_DEBUG, "executing `%s', reason %s",
620 ifp->name, ifp->state->reason); 620 ifp->name, ifp->state->reason);
621 #if 0 621 #if 0
622 /* push state over d-bus */ 622 /* push state over d-bus */
623 dhcpcd_dbus_configure(ifp, ifp->state->reason); 623 dhcpcd_dbus_configure(ifp, ifp->state->reason);
624 #endif 624 #endif
625 return 0; 625 return 0;
626 } 626 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698