diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 975fb47..4e344ba 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
}
if (opt_interactive) {
- interactive(opt_dst, opt_psm);
+ interactive(opt_src, opt_dst, opt_psm);
goto done;
}
diff --git a/attrib/gatttool.h b/attrib/gatttool.h
index e652a81..89ac282 100644
--- a/attrib/gatttool.h
+++ b/attrib/gatttool.h
*
*/
-int interactive(const gchar *dst, gboolean le);
+int interactive(const gchar *src, const gchar *dst, gboolean le);
GIOChannel *gatt_connect(const gchar *src, const gchar *dst,
const gchar *sec_level, int psm, int mtu,
BtIOConnect connect_cb);
diff --git a/attrib/interactive.c b/attrib/interactive.c
index e39b43c..5fc0af5 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
return TRUE;
}
-int interactive(const gchar *dst, int psm)
+int interactive(const gchar *src, const gchar *dst, int psm)
{
GIOChannel *pchan;
gint events;
opt_sec_level = g_strdup("low");
+ opt_src = g_strdup(src);
opt_dst = g_strdup(dst);
opt_psm = psm;
g_main_loop_unref(event_loop);
g_string_free(prompt, TRUE);
+ g_free(opt_src);
g_free(opt_dst);
g_free(opt_sec_level);