diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-01-10 15:08:01 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-01-10 15:08:01 -0600 |
commit | 51427d85169ac361bc9fe02619a9a54566880577 (patch) | |
tree | be866e41876f1435b7394f6a14e35fa8d613c4bd /plugins | |
parent | e6d8b537b9a7f54d94dcbee7873b5508eadc01d7 (diff) | |
download | ofono-51427d85169ac361bc9fe02619a9a54566880577.tar.bz2 |
tc65: No need to g_strdup options in the hashtable
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tc65.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/plugins/tc65.c b/plugins/tc65.c index e1a8cfab..68f6246e 100644 --- a/plugins/tc65.c +++ b/plugins/tc65.c @@ -79,8 +79,7 @@ static int tc65_enable(struct ofono_modem *modem) DBG("%p", modem); - options = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, - g_free); + options = g_hash_table_new(g_str_hash, g_str_equal); if (options == NULL) return -ENOMEM; @@ -88,25 +87,16 @@ static int tc65_enable(struct ofono_modem *modem) if (device == NULL) return -EINVAL; - g_hash_table_insert(options, g_strdup("Baud"), - g_strdup("115200")); - g_hash_table_insert(options, g_strdup("StopBits"), - g_strdup("1")); - g_hash_table_insert(options, g_strdup("DataBits"), - g_strdup("8")); - g_hash_table_insert(options, g_strdup("Parity"), - g_strdup("none")); - g_hash_table_insert(options, g_strdup("XonXoff"), - g_strdup("off")); - g_hash_table_insert(options, g_strdup("RtsCts"), - g_strdup("on")); - g_hash_table_insert(options, g_strdup("Local"), - g_strdup("on")); - g_hash_table_insert(options, g_strdup("Read"), - g_strdup("on")); + g_hash_table_insert(options, "Baud", "115200"); + g_hash_table_insert(options, "StopBits", "1"); + g_hash_table_insert(options, "DataBits", "8"); + g_hash_table_insert(options, "Parity", "none"); + g_hash_table_insert(options, "XonXoff", "off"); + g_hash_table_insert(options, "RtsCts", "on"); + g_hash_table_insert(options, "Local", "on"); + g_hash_table_insert(options, "Read", "on"); channel = g_at_tty_open(device, options); - g_hash_table_destroy(options); if (channel == NULL) |