Skip to content

Instantly share code, notes, and snippets.

@jdiez17
Created July 13, 2014 22:22
Show Gist options
  • Save jdiez17/74d85b07193aa51a4b0d to your computer and use it in GitHub Desktop.
Save jdiez17/74d85b07193aa51a4b0d to your computer and use it in GitHub Desktop.
void in_received_handler(DictionaryIterator* received, void* ctx) {
Tuple* data = dict_read_first(received);
while(data) {
switch(data->key) {
case KEY_UTC_OFFSET:
utc_offset = (time_t) data->value->int32;
persist_write_int(KEY_UTC_OFFSET, utc_offset);
break;
case KEY_NEXT_LAUNCH:
next_launch_ts = (time_t) data->value->int32;
persist_write_int(KEY_NEXT_LAUNCH, next_launch_ts);
break;
}
data = dict_read_next(received);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment