make get and getsrc actually work with new arch info

This commit is contained in:
Carsten Haitzler 2014-09-26 13:26:08 +09:00
parent 986ae7e70f
commit c331c1f105
2 changed files with 8 additions and 2 deletions

View File

@ -180,6 +180,7 @@ client_send(Client *c, const char *name)
char tmp[4096];
char *lnk;
printf("C arch: %s\n", c->arch);
if (!c->arch) return;
snprintf(tmp, sizeof(tmp), "%s/%s/%s", repodir, c->arch, name);
lnk = ecore_file_readlink(tmp);
@ -248,7 +249,11 @@ client_src_send(Client *c, const char *name)
static int
arch_ok(const char *arch)
{
if (!strcmp(arch, "x86_64-linux")) return 1;
if (!strcmp(arch, "linux-x86_64")) return 1;
if (!strcmp(arch, "linux-ix86")) return 1;
if (!strcmp(arch, "linux-arm")) return 1;
if (!strcmp(arch, "linux-ppc64")) return 1;
if (!strcmp(arch, "linux-ppc")) return 1;
return 0;
}
@ -375,6 +380,7 @@ _ipc_cb_dat(void *data, int type, void *event)
{
memcpy(arch, e->data, e->size);
arch[e->size] = 0;
printf("set arch %s\n", arch);
if (arch_ok(arch))
{
if (c->arch) free(c->arch);

2
mrk.c
View File

@ -1255,7 +1255,7 @@ _ipc3_cb_add(void *data, int type, void *event)
eina_version->major, eina_version->minor, eina_version->micro);
ecore_ipc_server_send(ipc, 10, M_ID_VERSION, 0, 0, 0,
tmp, strlen(tmp));
ecore_ipc_server_send(ipc, 10, M_QRY_GET, 0, 0, 0,
ecore_ipc_server_send(ipc, 10, M_QRY_GETSRC, 0, 0, 0,
downsrc_name, strlen(downsrc_name));
return EINA_TRUE;
}