diff options
author | David M. Lee <dlee@digium.com> | 2013-04-15 16:43:47 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-04-15 16:43:47 +0000 |
commit | c599aca553a57335267406b93c856e53c5e14db4 (patch) | |
tree | c1f8055e6cfc0cf5f1b6aeec5c9ec860ce6236cc /main/json.c | |
parent | 2450722f52401b8537e9c0ffb1192f38b7dd146d (diff) |
Moved core logic from app_stasis to res_stasis
After some discussion on asterisk-dev, it was decided that the bulk of
the logic in app_stasis actually belongs in a resource module instead
of the application module.
This patch does that, leaves the app specific stuff in app_stasis, and
fixes up everything else to be consistent with that change.
* Renamed test_app_stasis to test_res_stasis
* Renamed app_stasis.h to stasis_app.h
* This is still stasis application support, even though it's no
longer in an app_ module. The name should never have been tied to
the type of module, anyways.
* Now that json isn't a resource module anymore, moved the
ast_channel_snapshot_to_json function to main/stasis_channels.c,
where it makes more sense.
Review: https://reviewboard.asterisk.org/r/2430/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/json.c')
-rw-r--r-- | main/json.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/main/json.c b/main/json.c index 07d2c5e95..2aa53875b 100644 --- a/main/json.c +++ b/main/json.c @@ -519,16 +519,12 @@ struct ast_json *ast_json_dialplan_cep(const char *context, const char *exten, i "priority", priority != -1 ? ast_json_integer_create(priority) : ast_json_null()); } -struct ast_json *ast_json_timeval(const struct timeval *tv, const char *zone) +struct ast_json *ast_json_timeval(const struct timeval tv, const char *zone) { char buf[AST_ISO8601_LEN]; struct ast_tm tm = {}; - if (tv == NULL) { - return NULL; - } - - ast_localtime(tv, &tm, zone); + ast_localtime(&tv, &tm, zone); ast_strftime(buf, sizeof(buf),AST_ISO8601_FORMAT, &tm); |